package com.test.testCode.insertphone.repository;

import com.test.testCode.insertphone.entity.SysStudTelbook;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;
import java.util.Map;

@Repository
@Transactional
public interface StudTelBookRepository extends JpaRepository<SysStudTelbook, String> {

    @Query(value = "SELECT DISTINCT(student_code),student_id FROM sys_student", nativeQuery = true)
    List<Map<String, String>> get();

}
